const express = require('express')

const {uploadModule, uploadHandler} = require('./router_handlers/upload');
const getPics = require('./router_handlers/getPics')
const checkName = require('./router_handlers/checkName')
const register = require('./router_handlers/register')
const getPubKey = require('./router_handlers/getPubKey')
const login = require('./router_handlers/login')
const checkMail = require("./router_handlers/checkMail");
const sendVerMail = require('./router_handlers/sendVerMail');
const verify = require('./router_handlers/verify');
const changePassword = require('./router_handlers/changePassword');

const router = express.Router();

router.post('/upload', uploadModule.single('file'), uploadHandler);

router.get('/getPics', getPics);

router.get('/checkName', checkName);

router.get('/checkMail', checkMail);

router.post('/register', register);

router.get('/getPubKey', getPubKey);

router.post('/login', login);

router.get('/sendMail', sendVerMail);

router.get('/verify', verify);

router.put('/changePassword', changePassword);

// 导出router
module.exports = router
